ARD2  1.00 for Rev B. Hardware
Airbag Reference Demonstrator using MPC5604P
freemaster_tsa.c File Reference

FreeMASTER TSA implementation. More...

#include "freemaster.h"
#include "freemaster_private.h"
#include "freemaster_protocol.h"

Functions

void FMSTR_InitTsa (void)
 TSA Initialization.
FMSTR_BPTR FMSTR_GetTsaInfo (FMSTR_BPTR pMessageIO)
 Handling GETTSAINFO and GETTSAINFO_EX command.
FMSTR_BPTR FMSTR_GetStringLen (FMSTR_BPTR pMessageIO)
 Handling GETSTRLEN and GETSTRLEN_EX commands.
FMSTR_BOOL FMSTR_CheckTsaSpace (FMSTR_ADDR dwAddr, FMSTR_SIZE8 nSize, FMSTR_BOOL bWriteAccess)
 Check wether given memory region is "safe" (covered by TSA)

Detailed Description

FreeMASTER TSA implementation.

Version:
1.0.17.0
Date:
Aug-3-2011

This file implements a new FreeMASTER feature called Targer-side address translation.


Function Documentation

FMSTR_BOOL FMSTR_CheckTsaSpace ( FMSTR_ADDR  dwAddr,
FMSTR_SIZE8  nSize,
FMSTR_BOOL  bWriteAccess 
)

Check wether given memory region is "safe" (covered by TSA)

Parameters:
dwAddr- address of the memory to be checked
nSize- size of the memory to be checked
bWriteAccess- write access is required
Returns:
This function returns non-zero if user space is safe
FMSTR_BPTR FMSTR_GetStringLen ( FMSTR_BPTR  pMessageIO)

Handling GETSTRLEN and GETSTRLEN_EX commands.

Parameters:
pMessageIO- original command (in) and response buffer (out)
Returns:
As all command handlers, the return value should be the buffer pointer where the response output finished (except checksum)
FMSTR_BPTR FMSTR_GetTsaInfo ( FMSTR_BPTR  pMessageIO)

Handling GETTSAINFO and GETTSAINFO_EX command.

Parameters:
pMessageIO- original command (in) and response buffer (out)
Returns:
As all command handlers, the return value should be the buffer pointer where the response output finished (except checksum)